function [data, M] = load(file);
fid=fopen(file, 'rt');   %open the file

total= [];
for j=1:100
title = fgetl(fid);  %read in the header
data=fscanf(fid, '%i',[800]);   %read in daata
[m,n]=size(data);
for i=1:(800-m)
   data=[data;0];
end
total=[total,data];
end
fclose(fid);   %close the file

M=[];
for i=1:800
M = [M; mean( total(i,1:100))];
end

subplot(2,1,1)
plot(1:800, total)
subplot(2,1,2)
plot(1:800, M)




data=total;
